#pragma once
#include"stream.h"
class productBase
{
public:
	virtual void method()const = 0 {}
};
class productA :public productBase
{
public:
	void method()const override;
};

class productB :public productBase
{
public:
	void method()const override;
};
class factoryBase
{
public:
	virtual productBase* createaProduct() const = 0;
};

class factoryA :public factoryBase
{
public:
	productA* createaProduct() const;
};

class factoryB :public factoryBase
{
public:
	productB* createaProduct() const;
};
//int main(void)
//{
//	factoryBase* base = new factoryA();
//}